package design_pattern.decorator.test2;

/**
 * Created by WeiDingKuo on 2017/10/25 14:39
 */
public class Decorator2 extends DecrotatorBase {
    public Decorator2(ComponentImpl componet) {
        super(componet);
    }

    @Override
    public void dosomething() {
        befor();
        super.dosomething();
        after();
    }

    private void befor() {
        System.out.println("decorator 2 befor");
    }

    private void after() {
        System.out.println("decorator 2 after");
    }
}
